#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<vector>
#include<string>
#include<exception>


#include"ptr.h"

struct listnode
{
	weak_ptr<listnode> _prev=shared_ptr<listnode>(nullptr);
	weak_ptr<listnode> _next= shared_ptr<listnode>(nullptr);
	int _data = 0;
};
int main() 
{
	//auto_ptr<int>ap1(new int);
	//auto_ptr<int>ap2(new int);
	//ap2 = ap1;
	//ap1 = ap2;

	//unique_ptr<int>up1(new int);
	//unique_ptr<int>up2(new int);

	//shared_ptr<int>sp1(new int);
	//shared_ptr<int>sp2(sp1);
	//cout << sp2.use_count() << endl;
	//shared_ptr<int>sp3(new int);
	//shared_ptr<int>sp4(new int);
	//sp3 = sp4;

	shared_ptr<listnode>n1 = new listnode;
	shared_ptr<listnode>n2 = new listnode;
	n2->_prev = shared_ptr<listnode>(n1);
	n1->_next = shared_ptr<listnode>(n2);
	return 0;
}